package dk.degofedal.scala.math

class Sorters {

	def quickSort ( list : Array[Int]):Array[Int] = {
		if ( list.length <= 1 ) {
			list
		} else {
			val pivot = list( list.length / 2 )
			Array.concat(
					quickSort (list filter ( pivot > )),
					list filter ( pivot == ),
					quickSort (list filter ( pivot < ))
			)
		}
	}
	
}